package com.ztorn.services.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ztorn.mapper.LocationMapper;
import com.ztorn.model.TLocation;
import com.ztorn.services.LocationService;
import org.springframework.stereotype.Service;

@Service
public class LocationServiceImpl extends ServiceImpl<LocationMapper, TLocation> implements LocationService {


    @Override
    public int isExistLoc(String location) {
        Long loc = baseMapper.selectCount(new QueryWrapper<TLocation>().eq("loc", location));
        return loc.intValue();
    }
}